package org.jeecg.modules.depart.callback;

import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.depart.api.DeptApi;
import org.jeecg.modules.depart.entity.SysDepart;
import org.jeecg.modules.depart.entity.SysDepartTreeModel;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@ConditionalOnMissingClass("org.jeecg.modules.system.controller.SysDepartController")
public class DeptApiCallback implements DeptApi {
    @Override
    public Result<SysDepart> getById(String deptId) {
        throw new RuntimeException("组织管理不可用");
    }

    @Override
    public Result<SysDepart> add(SysDepart sysDepart) {
        throw new RuntimeException("组织管理不可用");
    }

    @Override
    public Result<List<SysDepartTreeModel>> getTree(String userId) {
        throw new RuntimeException("组织管理不可用");
    }

    @Override
    public Result<List<SysDepartTreeModel>> getChildDeptTree(String deptId) {
        throw new RuntimeException("组织管理不可用");
    }

    @Override
    public Result<List<String>> getChildIdList(String deptId) {
        throw new RuntimeException("组织管理不可用");
    }

    @Override
    public Result<SysDepart> edit(SysDepart depart) {
        throw new RuntimeException("组织管理不可用");
    }

    @Override
    public Result<List<SysDepart>> getSubjectOfCostCalc(String deptId, String name) {
        throw new RuntimeException("组织管理不可用");
    }

    @Override
    public Result<?> delete(String id) {
        throw new RuntimeException("组织管理不可用");
    }

    @Override
    public Result<List<SysDepart>> getList(String userId)  {
        throw new RuntimeException("组织管理不可用");
    }
}
